<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>linux下开发大神装机命令大全-从娱乐到开发 | Jin Tian</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="Linux" />
  
  
  
  
  <meta name="description" content="这篇文章是一个收藏集。">
<meta name="keywords" content="Linux">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux下开发大神装机命令大全-从娱乐到开发">
<meta property="og:url" content="http://yoursite.com/2016/12/01/Ubuntu下开发大神玩机命令大全-从娱乐到开发/index.html">
<meta property="og:site_name" content="Jin Tian">
<meta property="og:description" content="这篇文章是一个收藏集。">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2016-12-11T15:23:42.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Linux下开发大神装机命令大全-从娱乐到开发">
<meta name="twitter:description" content="这篇文章是一个收藏集。">
  
    <link rel="alternate" href="/atom.xml" title="Jin Tian" type="application/atom+xml">
  

  

  <link rel="icon" href="/css/images/mylogo.jpg">
  <link rel="apple-touch-icon" href="/css/images/mylogo.jpg">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/9749f0/00000000000000000001008f/27/l?subset_id=2&fvd=n5) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/90cf9f/000000000000000000010091/27/l?subset_id=2&fvd=n7) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/8a5494/000000000000000000013365/27/l?subset_id=2&fvd=n4) format("woff2");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/d337d8/000000000000000000010095/27/l?subset_id=2&fvd=i4) format("woff2");font-weight:400;font-style:italic;}</style>
  <link rel="stylesheet" href="/css/style.css">

  <script src="/js/jquery-3.1.1.min.js"></script>
  <script src="/js/bootstrap.js"></script>

  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/css/bootstrap.css" >

  
    <link rel="stylesheet" href="/css/dialog.css">
  

  

  
    <link rel="stylesheet" href="/css/header-post.css" >
  

  
  
  
    <link rel="stylesheet" href="/css/vdonate.css" >
  

</head>



  <body data-spy="scroll" data-target="#toc" data-offset="50">


  
  <div id="container">
    <div id="wrap">
      
        <header>

    <div id="allheader" class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="navbar-inner">
          
          <div class="container"> 
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>

            
              <a class="brand" style="
                 border-width: 0px;  margin-top: 0px;"  
                href="#" data-toggle="modal" data-target="#myModal" >
                  <img width="124px" height="124px" alt="Hike News" src="/css/images/mylogo.jpg">
              </a>
            
            
            <div class="navbar-collapse collapse">
              <ul class="hnav navbar-nav">
                
                  <li> <a class="main-nav-link" href="/">首页</a> </li>
                
                  <li> <a class="main-nav-link" href="/archives">归档</a> </li>
                
                  <li> <a class="main-nav-link" href="/categories">分类</a> </li>
                
                  <li> <a class="main-nav-link" href="/tags">标签</a> </li>
                
                  <li> <a class="main-nav-link" href="/about">关于</a> </li>
                
                  <li> <a class="main-nav-link" href="http://luoli-luoli.com/chat">chat</a> </li>
                
                  <li><div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="请输入关键词..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '(无标题)',
        },
        ROOT_URL: '/',
        CONTENT_URL: '/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/js/insight.js"></script>

</div></li>
            </div>
          </div>
                
      </div>
    </div>

</header>



      
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-Ubuntu下开发大神玩机命令大全-从娱乐到开发" style="width: 75%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
  <div id="articleInner" class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      Linux下开发大神装机命令大全-从娱乐到开发
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	<a href="/2016/12/01/Ubuntu下开发大神玩机命令大全-从娱乐到开发/" class="article-date">
	  <time datetime="2016-12-01T10:55:15.000Z" itemprop="datePublished">2016-12-01</time>
	</a>

      
      
	<a class="article-views">
	<span id="busuanzi_container_page_pv">
		阅读量<span id="busuanzi_value_page_pv"></span>
	</span>
	</a>

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <p>这篇文章是一个收藏集。<br><a id="more"></a></p>
<p>我将列举在Ubuntu下所有遇到的命令行操作。在本篇文章收集的差不多的时候我将把所有命令整合为一个.sh文件，大家装机Ubuntu后可以选择对应的版本安装配置，从而节约大量配置一些环境的时间。暂时分为三个版本：<strong>娱乐版</strong>，<strong>开发版</strong>，<strong>极客版</strong>。</p>
<blockquote>
<p>本文由中南大学较为牛逼的研究生金天同学原创，欢迎转载，但是请保留这段版权信息，如果你对文章有任何疑问，欢迎微信联系我：jintianiloveu。牛逼大神一一为你解答！</p>
</blockquote>
<p>娱乐版面向普通大众，包括一些娱乐软件的安装如QQ，迅雷，Word，ubuntu主题美化软件等的安装，开发版则包括一些开发工具的安装，比如Cmake，g++，python3.5，java等环境的搭建，当然开发版在娱乐版的基础上的扩充，为了防止臃肿所以不放在一个版本；最后极客版是集成了深度学习、Java、Python、CUDA与一体的开发环境，对机器要求较高。<br><strong>更新</strong><br><strong>以后安装Ubuntu系统一定记得如果做开发的话home分区分至少50G！！太小了尼玛分分钟满了，root分区也至少50G，否则以后修改分区真鸡巴，麻烦</strong></p>
<h3 id="Ubuntu装机命令之-娱乐版（麻瓜版）"><a href="#Ubuntu装机命令之-娱乐版（麻瓜版）" class="headerlink" title="Ubuntu装机命令之-娱乐版（麻瓜版）"></a>Ubuntu装机命令之-娱乐版（麻瓜版）</h3><p>在这个版本我们将实现以下软件的安装和配置：</p>
<ul>
<li>Longue QQ</li>
<li>wine 最新版本</li>
<li>迅雷替代软件-uget</li>
<li>主题美化软件-unity-tweak-tools</li>
<li>麻瓜版预装主题-macbuntu</li>
<li>麻瓜版预装图标-numbic-circle</li>
<li>终端美化-oh my zash</li>
<li>chrome 浏览器</li>
<li>搜狗拼音输入法 for linux</li>
<li>网易云音乐 for linux</li>
<li>仿mac dock栏软件plank</li>
</ul>
<h3 id="Ubuntu装机命令之-开发版"><a href="#Ubuntu装机命令之-开发版" class="headerlink" title="Ubuntu装机命令之-开发版"></a>Ubuntu装机命令之-开发版</h3><p>开发版我们在娱乐版的基础之上，还将安装一下：</p>
<ul>
<li>Python3.5</li>
<li>Java 8</li>
<li>Atom Markdown 写作神器</li>
<li>Brackets 前端神器</li>
<li>opencv(这个我会单独开一个版本，其中还包括Cmake，g++等的安装)</li>
<li>…陆续补充中</li>
</ul>
<h3 id="Ubuntu装机命令之-极客版"><a href="#Ubuntu装机命令之-极客版" class="headerlink" title="Ubuntu装机命令之-极客版"></a>Ubuntu装机命令之-极客版</h3><p>最后极客版在开发版的基础之上，我们还将实现一下的安装：</p>
<ul>
<li>CUDA和CUDNN（前提是有支持的显卡）</li>
<li>Mxnet的编译和安装</li>
<li>Tensorflow的安装</li>
<li>….陆续补充中</li>
</ul>
<h3 id="具体安装代码集锦（方便大家拷贝代码段）"><a href="#具体安装代码集锦（方便大家拷贝代码段）" class="headerlink" title="具体安装代码集锦（方便大家拷贝代码段）"></a>具体安装代码集锦（方便大家拷贝代码段）</h3><ul>
<li><h5 id="CMake的安装"><a href="#CMake的安装" class="headerlink" title="CMake的安装"></a>CMake的安装</h5><p>首先大家前往官网下载cmake包，解压到Download路径下，然后把文件夹复制到/usr/local中我们安装在这里：</p>
<figure class="highlight stata"><table><tr><td class="code"><pre><div class="line">sudo cp -r cmake-3.7.1 /usr/<span class="keyword">local</span></div><div class="line"><span class="keyword">cd</span> /usr/<span class="keyword">local</span>/cmake-3.7.1</div><div class="line">sudo ./<span class="keyword">bootstrap</span></div><div class="line">sudo make</div><div class="line">sudo make install</div><div class="line">cmake --<span class="keyword">version</span></div></pre></td></tr></table></figure>
<p><strong>更新</strong><br>其实cmake可以直接用apt来下载和安装，apt不行的情况下在使用上面的方法，apt办法为：</p>
<figure class="highlight cmake"><table><tr><td class="code"><pre><div class="line">sudo apt <span class="keyword">install</span> cmake</div></pre></td></tr></table></figure>
</li>
<li><h5 id="OpenCV的编译和安装，生成python版本"><a href="#OpenCV的编译和安装，生成python版本" class="headerlink" title="OpenCV的编译和安装，生成python版本"></a>OpenCV的编译和安装，生成python版本</h5></li>
</ul>
<figure class="highlight crystal"><table><tr><td class="code"><pre><div class="line">export PYTHON3_EXECUTABLE=<span class="regexp">/usr/bin</span><span class="regexp">/python</span></div><div class="line">export PYTHON_INCLUDE_DIR=/usr<span class="regexp">/include/python</span>3.<span class="number">5</span></div><div class="line">export PYTHON_INCLUDE_DIR2=<span class="regexp">/usr/include</span><span class="regexp">/x86_64-linux-gnu/python</span>3.<span class="number">5</span></div><div class="line">export PYTHON_LIBRARY=<span class="regexp">/usr/lib</span><span class="regexp">/x86_64-linux-gnu/libpython</span>3.<span class="number">5</span>.so</div><div class="line">export PYTHON3_NUMPY_INCLUDE_DIRS=<span class="regexp">/usr/lib</span><span class="regexp">/python3.5/dist</span>-packages/numpy/core/<span class="keyword">include</span>/</div></pre></td></tr></table></figure>
<p>接下来clone opencv源码，cd进入新建一个build文件夹，进入这个文件夹，执行：<br><figure class="highlight gauss"><table><tr><td class="code"><pre><div class="line">cmake -D CMAKE_BUILD_TYPE=bulid -D CMAKE_INSTALL_PREFIX=/usr/<span class="keyword">local</span> -D CUDA_GENERATION=Kepler ..</div><div class="line">sudo <span class="built_in">make</span> -j8</div><div class="line">sudo <span class="built_in">make</span> install</div></pre></td></tr></table></figure></p>
<figure class="highlight mathematica"><table><tr><td class="code"><pre><div class="line">cmake -<span class="keyword">D</span> CMAKE_BUILD_TYPE=RELEASE -<span class="keyword">D</span> CMAKE_INSTALL_PREFIX=/usr/local -<span class="keyword">D</span> INSTALL_PYTHON_EXAMPLES=ON -<span class="keyword">D</span> OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib<span class="number">-3.1</span><span class="number">.0</span>/modules -<span class="keyword">D</span> PYTHON_EXECUTABLE=/usr/bin/python -<span class="keyword">D</span> BUILD_EXAMPLES=ON ..</div></pre></td></tr></table></figure>
<p>这里由于我的电脑是有GPU的，而且安装了cuda，因此后面cmake的时候有一个参数为CUDA_GENERATION,我们选择Auto，如果不加这个就是编译CPU版本，但是我这里不加会报错，建议只用CPU的可以不加这个参数。这里，make -j8参数是指定多核编译，8是你的CPU核心数。</p>
<p>最后我会把源代码开源到github，欢迎大家前去使用把安装过程中遇到的错误开issue提出来，也欢迎大家fork然后pull自己的安装命令进来，把我们的命令大全不断的扩充，满足更多人的需要。</p>

      
    </div>
    <footer class="article-footer">
      
        <div id="donation_div"></div>

<script src="/js/vdonate.js"></script>
<script>
var a = new Donate({
  title: '骚年，加个好友打赏一下啊，现在连泡面都吃不起了啊', // 可选参数，打赏标题
  btnText: '打赏支持', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: 'https://i.loli.net/2017/09/27/59cb048ba6838.jpeg',
  alipayImage: 'https://i.loli.net/2017/09/27/59cb049cd0951.jpeg'
});
</script>
      
      
        
	<div id="comment">
		<!-- 来必力City版安装代码 -->
		<div id="lv-container" data-id="city" data-uid="MTAyMC8zMDA5MC82NjQ1">
		<script type="text/javascript">
		   (function(d, s) {
		       var j, e = d.getElementsByTagName(s)[0];

		       if (typeof LivereTower === 'function') { return; }

		       j = d.createElement(s);
		       j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
		       j.async = true;

		       e.parentNode.insertBefore(j, e);
		   })(document, 'script');
		</script>
		<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
		</div>
		<!-- City版安装代码已完成 -->
	</div>



      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Linux/">Linux</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2016/12/02/Ubuntu下设置AndroidStudio的启动快捷方式/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">上一篇</strong>
      <div class="article-nav-title">
        
          Ubuntu下设置AndroidStudio的启动快捷方式
        
      </div>
    </a>
  
  
    <a href="/2016/12/01/Ubuntu16-04搭建Mxnet惊天地泣鬼神完整教程-深度学习起航/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">下一篇</strong>
      <div class="article-nav-title">Ubuntu16.04搭建Mxnet惊天地泣鬼神完整教程,深度学习起航</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="toc-sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">文章目录</strong>
    
        <ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#Ubuntu装机命令之-娱乐版（麻瓜版）"><span class="nav-number">1.</span> <span class="nav-text">Ubuntu装机命令之-娱乐版（麻瓜版）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Ubuntu装机命令之-开发版"><span class="nav-number">2.</span> <span class="nav-text">Ubuntu装机命令之-开发版</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Ubuntu装机命令之-极客版"><span class="nav-number">3.</span> <span class="nav-text">Ubuntu装机命令之-极客版</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#具体安装代码集锦（方便大家拷贝代码段）"><span class="nav-number">4.</span> <span class="nav-text">具体安装代码集锦（方便大家拷贝代码段）</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#CMake的安装"><span class="nav-number">4.0.1.</span> <span class="nav-text">CMake的安装</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#OpenCV的编译和安装，生成python版本"><span class="nav-number">4.0.2.</span> <span class="nav-text">OpenCV的编译和安装，生成python版本</span></a></li></ol></li></ol></li></ol>
    
    </div>
  </aside>
</section>
        
      </div>
      
      <footer id="footer">
  

  <div class="container">
      	<div class="row">
	      <p> Powered by <a href="http://www.luoli-luoli.com/" target="_blank">萝莉萝莉</a> and <a href="http://www.luoli-luoli.com/sia" target="_blank">Sia</a> </p>
	      <p id="copyRightEn">Copyright &copy; 2017 - 2018 Jin Tian All Rights Reserved.</p>
	      
	      
    		<p class="busuanzi_uv">
				访客数 : <span id="busuanzi_value_site_uv"></span> |  
				访问量 : <span id="busuanzi_value_site_pv"></span>
		    </p>
  		   
		</div>

		
  </div>
</footer>


<!-- min height -->

<script>
    var wrapdiv = document.getElementById("wrap");
    var contentdiv = document.getElementById("content");
    var allheader = document.getElementById("allheader");

    wrapdiv.style.minHeight = document.body.offsetHeight + "px";
    if (allheader != null) {
      contentdiv.style.minHeight = document.body.offsetHeight - allheader.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    } else {
      contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    }
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/categories" class="mobile-nav-link">Categories</a>
  
    <a href="/tags" class="mobile-nav-link">Tags</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
    <a href="http://luoli-luoli.com/chat" class="mobile-nav-link">Chat</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/scripts.js"></script>




  <script src="/js/dialog.js"></script>








	<div style="display: none;">
    <script src="https://s95.cnzz.com/z_stat.php?id=1260716016&web_id=1260716016" language="JavaScript"></script>
  </div>



	<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h2 class="modal-title" id="myModalLabel">设置</h2>
      </div>
      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">


      <div class="modal-body">
          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" onclick="javascript:setFontSize();" aria-expanded="true" aria-controls="collapseOne">
              正文字号大小
            </a>
          </div>
          <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            您已调整页面字体大小
          </div>
        </div>
      


          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" onclick="javascript:setBackground();" aria-expanded="true" aria-controls="collapseTwo">
              夜间护眼模式
            </a>
        </div>
          <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
          <div class="panel-body">
            夜间模式已经开启，再次单击按钮即可关闭 
          </div>
        </div>

        <div>
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关 于&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
        </div>
         <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
          <div class="panel-body">
            Jin Tian
          </div>
          <div class="panel-body">
            Copyright © 2018 Jintian All Rights Reserved.
          </div>
        </div>
      </div>


      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <div class="modal-footer">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
      </div>
    </div>
  </div>
</div>
  
  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/js/totop.js?v=1.0.0" async=""></script>
  
    <a id="menu-switch"><i class="fa fa-bars fa-lg"></i></a>
  
</body>
</html>